function createConfigFile( currentPath, folder, fileName, commentString, ...
    plotTimes, plotVeloDistBool, smoothPlotBool, plotDensityBool, plotLogBool, plot2DBool, saveFiguresBool, saveFormat, ...
    collisionBool, nMin, kMax, negativeVeloBool, veloSmoothNonColBool, veloSmoothColBool, smoothWidth, keepParticleBool, ...
    time, angle, radius, velo, ...
    uc, ucRatio, atomUC, nAtomUC, nOxidePerElement, targetDensity, densityRatio, absorbedRatio, heatTarget, energyExcitation, ...
    bg, bgPressure, bgTemperature, bgDensity, ...
    spotWidth, spotHeight, ablationDepth, ablationVolume, laserFluence, energyLaser, ...
    cosPowerFit, distributionType, initVeloDistWidth, ...
    nAtomAblated, nPlasmaTotal, nBGTotal, nNonColTotal, nColTotal, ...
    plasmaTempStart, plasmaTempEnd, bgTempStart, bgTempEnd, ...
    debugBool, durationTotal, nLoops )
%CREATECONFIGFILE Create a configuration file based on model parameters

% Generate file path
FILE_PATH = [currentPath '\' folder '\' fileName '_' ...
    datestr(now, 'yyyy-mm-dd_HHMM') '.txt'];

% Open file for writing
fileID = fopen(FILE_PATH, 'wt');

% Write information to file
fprintf( fileID, [ ...
    'CONFIGURATION FILE\t' datestr(now, 'yyyy-mm-dd\tHH:MM') '\n' ...
    ...
    '\n\tPlot settings:\n' ...
    'Times to plot [s]:\t\t'                    num2str( time(plotTimes) ) '\n' ...
    'Plot initial velocity distribution:\t'     num2str( plotVeloDistBool ) '\n' ...
    'Smooth plots:\t\t'                         num2str( smoothPlotBool ) '\n' ...
    'Plot background gas denisity:\t'           num2str( plotDensityBool ) '\n' ...
    'Set log scale for plots:\t\t'              num2str( plotLogBool ) '\n' ...
    'Calculate all angles:\t\t'                 num2str( plot2DBool ) '\n' ...
    'Save figures:\t\t'                         num2str( saveFiguresBool ) '\n' ...
    ...
    '\n\tComputational restrictions:\n' ...
    'Collisions enabled:\t\t\t\t'                               num2str( collisionBool ) '\n' ...
    'Minimal number of plasma particles per bin:\t\t'           num2str( nMin, 3 ) '\n' ...
    'Maximum counted number of collisions per particle:\t'      num2str( kMax, 3 ) '\n' ...
    'Allow negative velocities:\t\t\t'                          num2str( negativeVeloBool, 3 ) '\n' ...
    'Non-collided velocity smoothing:\t\t\t'                    num2str( veloSmoothNonColBool ) '\n' ...
    'Collided velocity smoothing:\t\t\t'                        num2str( veloSmoothColBool ) '\n' ...
    'Velocity smoothing width:\t\t\t'                           num2str( smoothWidth, 3 ) '\n' ...
    'Preserve particles in last radial bin:\t\t\t'              num2str( keepParticleBool, 3 ) '\n' ...
    ...
    '\n\tDimensional limits:\n' ...
    'Temporal limits [s]:\t'          num2str( 0 ) ...
                               ' : '  num2str( max(time) / (numel(time) - 1), 3 ) ...
                               ' : '  num2str( max(time), 3 ) '\n' ...
    'Angular limits [deg]:\t'         num2str( 0 ) ...
                               ' : '  num2str( max(angle) / (numel(angle) - 1), 3 ) ...
                               ' : '  num2str( max(angle), 3 ) '\n' ...
    'Radial limits [m]:\t'            num2str( 0 ) ...
                               ' : '  num2str( max(radius) / (numel(radius) - 1), 3 ) ...
                               ' : '  num2str( max(radius), 3 ) '\n' ...
    'Velocity limits [m/s]:\t'        num2str( min(velo) ) ...
                               ' : '  num2str( (max(velo) - min(velo)) / (numel(velo) - 1), 3 ) ...
                               ' : '  num2str( max(velo), 3 ) '\n' ...
    ...
    '\n\tMaterial parameters:\n' ...
    'Unit cell components:\t\t\t'               [ uc.FORMULA ] '\n' ...
    'Unit cell ratio:\t\t\t['                   num2str( ucRatio ) ']\n' ...
    'Unique elements in target:\t\t'            [ atomUC.SYMBOL ] '\n' ...
    'Amount of eacht element in target:\t\t'    num2str( nAtomUC ) '\n' ...
    'Number of oxides per metal:\t\t'           num2str( nOxidePerElement, 3 ) '\n' ...
    'Target density [kg / m^3]:\t\t'            num2str( targetDensity, 3 ) '\n' ...
    'Density ratio:\t\t\t'                      num2str( densityRatio, 3 ) '\n' ...
    'Ratio of energy absorbed:\t\t'             num2str( absorbedRatio, 3 ) '\n' ...
    'Heat dissipation [J]:\t\t\t'               num2str( heatTarget, 3 ) '\n' ...
    'Excitation energy per atom [J]:\t\t'    	num2str( energyExcitation, 3 ) '\n' ...
    ...
    '\n\tBackground gas parameters:\n' ...
    'Background gas molecule [mbar]:\t\t'   [ bg.SYMBOL ] '\n' ...
    'Background pressure [mbar]:\t\t'       num2str( bgPressure, 3 ) '\n' ...
    'Background temperature [K]:\t\t'       num2str( bgTemperature, 3 ) '\n' ...
    'Background gas density [m^-3]:\t\t'    num2str( bgDensity, 3 ) '\n' ...
    ...
    '\n\tLaser parameters:\n' ...
    'Laser spot width [m]:\t\t'       num2str( spotWidth, 3 ) '\n' ...
    'Laser spot height [m]:\t\t'      num2str( spotHeight, 3 ) '\n' ...
    'Ablation depth [m]:\t\t'         num2str( ablationDepth, 3 ) '\n' ...
    'Ablation volume [m^3]:\t\t'      num2str( ablationVolume, 3 ) '\n' ...
    'Laser fluence [J / cm^2]:\t'     num2str( laserFluence, 3 ) '\n' ...
    'Laser energy [J]:\t\t'           num2str( energyLaser, 3 ) '\n' ...
    ...
    '\n\tModel parameters:\n' ...
    'Angular distribution fit parameter:\t'     num2str( cosPowerFit ) '\n' ...
    'Initial velocity distribution type:\t'     distributionType '\n' ...
    'Initial velocity distribution width:\t'    num2str( initVeloDistWidth ) '\n' ...
    ...
    '\n\tNumber of particles:\n' ...
    'Total number of ablated atoms:\t\t\t'                          num2str( nAtomAblated, 3 ) '\n' ...
    'Total number of plasma particles at first angle:\t\t'          num2str( nPlasmaTotal, 3 ) '\n' ...
    'Total number of background gas particles at first angle:\t'    num2str( nBGTotal, 3 ) '\n' ...
    'Total number of non-collided particles:\t\t'                   num2str( nNonColTotal, 3 ) '\n' ...
    'Total number of collided particles:\t\t\t'                     num2str( nColTotal, 3 ) '\n' ...
    ...
    '\n\tTemperatures:\n' ...
    'Initial plasma temperature [K]:\t\t\t'           num2str( plasmaTempStart, 3 ) '\n' ...
    'Final plasma temperature [K]:\t\t\t'             num2str( plasmaTempEnd, 3 ) '\n' ...
    'Initial background gas temperature [K]:\t\t'     num2str( bgTempStart, 3 ) '\n' ...
    'Final background gas temperature [K]:\t\t'       num2str( bgTempEnd, 3 ) '\n' ...
    ...
    '\n\tTechnical:\n' ...
    'Debug mode:\t\t\t'                       num2str( debugBool ) '\n' ...
    'Total excecution time [s]:\t\t'          num2str( durationTotal, 3 ) '\n' ...
    'Total number of computed loops:\t\t'     num2str( nLoops ) '\n' ...
    ...
    '\n\tComments:' '\n' commentString] ...
    );

fclose(fileID);
end
